void main() {
// 类似 js 中的 Set
  Set s = new Set();
  List ls = [];

  print('==== add 添加元素，只能一个=======');
  s.add('香蕉');
  s.add('苹果');
  s.add('苹果');
  print(s);
  print(s is Set);

  print('==== 转 list =======');
  ls = s.toList();
  print(ls);
  print(ls is List);

  print('==== set 去重 =======');
  ls = [1, 1, 2, 2, 3];
  s = new Set();
  s.addAll(ls);
  ls = s.toList();
  print(ls);
  print(ls is List);
}
